<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>1.5.x Change Log : DataMapper ORM - User Guide</title>

<style type="text/css" media="all">@import url('../../css/userguide.css');</style>
<link rel="shortcut icon" type="image/png" href="../../images/favicon.png" />
<link rel="stylesheet" type="text/css" media="all" href="../../css/userguide.css" />
<link rel="alternate" type="application/rss+xml" title="Datamapper ORM Updates Feed" href="/rss.xml" />

<meta http-equiv="expires" content="-1" />
<meta http-equiv= 'pragma' content="no-cache" />
<meta name="robots" content="all" />

</head>

<body>

<!-- START NAVIGATION -->
<div id="nav"><div id="nav_inner"></div></div>
<div id="nav2"><a name="top">&nbsp;</a><a id="nav_toggle" href="#"><img src="../../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td><h1>DataMapper ORM</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
</div>
<!-- END NAVIGATION -->

<!-- START BREADCRUMB -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td id="breadcrumb">
<a href="/">Datamapper ORM Home</a> &nbsp;&#8250;&nbsp;
<a href="../../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
<a href="../changelog.html">Changelog</a> &nbsp;&#8250;&nbsp;
1.5.x Change Log
</td>
</tr>

</table>
<!-- END BREADCRUMB -->

<br clear="all" />


<!-- START CONTENT -->
<div id="content">


<h1>1.5.x Change Log</h1>

<p>For more information on upgrading to the latest release, please see <a href="../upgrade.html">Upgrade Instructions</a></p>

<h2><a href="/DMZ_1.5.4.zip">Version 1.5.4</a></h2>
<p>Release Date: October 21, 2009</p>
<ul>
	<li>
		<strong>Bug Fixes</strong>
		<ul>
			<li>Fixed bug when using related validation rules.</li>
		</ul>
	</li>
	<li>
		<strong>Other Changes</strong>
		<ul>
			<li>Due to the bugfix, <var><u>count</u></var> now accepts an <a href="../count.html">array of ids to exclude</a> from the result.</li>
			<li>Fixed several broken links throughout documentation.</li>
		</ul>
	</li>
</ul>

<h2><a href="/DMZ_1.5.3.zip">Version 1.5.3</a></h2>
<p>Release Date: September 17, 2009</p>
<ul>
	<li>
		<strong>Core Changes</strong>
		<ul>
			<li>
				Modified the way <var><u>_to_object</u></var> and query processing works, significantly, by merging all query processing
				code into one new function (<var><u>_process_query</u></var>).  The function <var><u>_to_object</u></var> is now used just to
				process converting a single database row into an object, and setting up that object.
			</li>
		</ul>
	</li>
	<li>
		<strong>Bug Fixes</strong>
		<ul>
			<li>Fixed bug that completely broke include_required's ability to automatically add all fields.</li>
			<li>Fixed bugs with get_rules not being called correctly for related queries and <var><u>validate</u></var><kbd>-&gt;</kbd><var><u>get</u></var><kbd>()</kbd> queries.</li>
			<li>Invalid relationship queries now show an error instead of silently failing.</li>
			<li>Fixed typo in Troubleshooting where the word 'related' was supposed to be 'required'.</li>
		</ul>
	</li>
	<li>
		<strong>Other Changes</strong>
		<ul>
			<li>New reserved method names: <var><u>_process_query</u></var> and <var><u>_remove_other_one_to_one</u></var> (actually has been around since at least 1.5.2)</li>
		</ul>
	</li>
</ul>

<h2><a href="/DMZ_1.5.2.zip">Version 1.5.2</a></h2>
<p>Release Date: September 8, 2009</p>
<ul>
	<li>
		<strong>Core Changes</strong>
		<ul>
			<li>By default, Datamapper ORM now adds items to the <var><i>all</i></var> array using a normal, indexed order.  The old method was to add them to the array by their ID.
				<p class="important">
					This change could easily break existing code, because the old method effectively made every query <strong>DISTINCT</strong>.
					To help with this, there is a new <a href="../config.html">config option</a>, <var><i>all_array_uses_ids</i></var>.
					Set this to <dfn>TRUE</dfn> to restore the original behavior.  Using the new behavior is recommended whenever possible.
				</p>
			</li>
		</ul>
	</li>
	<li>
		<strong>Extension Changes</strong>
		<ul>
			<li><strong><a href="../extensions/htmlform.html">HTMLForm</a></strong>
				<ul>
					<li>shawn (CI forum member 2309) suggested adding a new file input, which has been added.</li>
					<li>Fixed a bug that prevented checkboxes and radio buttons from adding square brackets (<strong>[ ]</strong>) with custom (non-object) fields.</li>
					<li>Custom, non-object fields can specify a default value.</li>
				</ul>
			</li>
		</ul>
	</li>
	<li>
		<strong>Bug Fixes</strong>
		<ul>
			<li>Changed the order of extension checking to give precedence to MY_ prefixes.  Also, if the class has a &ldquo;<i>MY_</i>&rdquo; prefix, Datamapper ORM will automatically load the library it is based on.</li>
			<li>Fixed bugs related to saving and deleting self-relationship in-table foreign keys.</li>
			<li>Fixed a bug where changing a one-to-one in-table foreign key might have broken relationship integrity.</li>
			<li>Fixed a bug in add_table_name that was eating spaces on the field parameter.</li>
			<li>Fixed a bug that prevented <var><u>include_related</u></var> from working with deep relationships <i>and</i> the all fields option, found by PoetaWD.</li>
			<li>Fixed a typo-mistake in the <var>_template.php</var> model, found by <a href="http://codeigniter.com/forums/member/96356/">BrianDHall</a>.</li>
		</ul>
	</li>
</ul>

<h2><a href="/DMZ_1.5.1.zip">Version 1.5.1</a></h2>
<p>Release Date: August 27, 2009</p>
<ul>
	<li>
		<strong>Core Changes</strong>
		<ul>
			<li>Global extensions will no longer override local extensions.  This means an extension can be customized on a per-model basis.</li>
		</ul>
	</li>
	<li>
		<strong>Bug Fixes</strong>
		<ul>
			<li>Fixed bugs in <var><u>count</u></var> and <var><u>delete</u></var> related to self-referencing in-table foreign keys. (Thanks <a href="http://codeigniter.com/forums/member/99367/">mcnux</a>!)</li>
			<li>
				Based on a suggestion from pdswan (CI forum member 53883), queries that do not include an <var><i>id</i></var> column will now work.
				There is still a plan in the future (probably 2.0) to remove the code that uses the <var><i>id</i></var> as for keys on the <var><i>all</i></var> array.
			</li>
		</ul>
	</li>
</ul>

<h2><a href="/DMZ_1.5.0.zip">Version 1.5.0</a></h2>
<p>Release Date: August 25, 2009</p>
<ul>
	<li>
		<strong>Core Changes</strong>
		<ul>
			<li>Added a new <var><u>update</u></var> method, which allows for <a href="../update.html">updating multiple objects at a time</a>, based on ideas discussed with <a href="http://codeigniter.com/forums/member/55367/">ben_co</a> and <a href="http://codeigniter.com/forums/member/36082/">Mirage</a>.</li>
			<li>Added the ability to have <a href="../getrules.html">get rules</a> that run after the querying the database.  By default this automatically converts all <var>id</var> columns to integers.</li>
			<li>Datamapper ORM now adds the table name to every field, unless that field already contains a <kbd>.</kbd> or <kbd>(</kbd>.  You can prevent the table name addition by simply wrapping a field in parentheses.</li>
			<li>Extensions can now optionally be named with one of four prefixes: <strong>DMZ_</strong>, <strong>DataMapper_</strong>, <strong>CI_</strong>, or whatever <dfn>'subclass_prefix'</dfn> is set to (usually <strong>MY_</strong>).  (Thanks Mirage, for the idea!)</li>
			<li>Two of the included extensions (<b>arrayutils</b> and <b>csvutils</b>) have been renamed.  You can continue using the old ones, or update to the new ones.  The old names are no longer supported.</li>
		</ul>
	</li>
	<li>
		<strong>Bug Fixes</strong>
		<ul>
			<li>Added code to ensure that previous queries were grouped when calling <var>$objectA</var><kbd>-></kbd><var><i>objectB</i></var><kbd>-></kbd><var><u>count</u></var><kbd>()</kbd></li>
			<li>Fixed a bug when using limits with this style query:
				<pre><var>$object</var><kbd>-&gt;</kbd><var><i>related</i></var><kbd>-&gt;</kbd><var><u>limit</u></var><kbd>(</kbd><var>$limit</var><kbd>)-&gt;</kbd><var><u>get</u></var><kbd>()</kbd></pre>
			</li>
			<li>Fixed (probably several) bug(s) related to using <var><i>$auto_populate_has_one</i></var> and <var><i>$auto_populate_has_many</i></var> rules.
				These will no longer run if the current object does not <var><u>exist</u></var>, and any current query is saved if it does.</li>
			<li>Forced the return value from <var><u>count</u></var> to be an integer.</li>
		</ul>
	</li>
	<li>
		<strong>Improvements</strong>
		<ul>
			<li>Added new <var><u>trim</u></var> rule, overriding PHP's built-in <var><b>trim</b></var><kbd>()</kbd> function.  The updated rule will not change <dfn>NULL</dfn> values into empty strings.</li>
			<li>You can now <a href="../validation.html#Custom.Error.Messages">return an error message</a> from custom validation routines, instead of just <dfn>TRUE</dfn> or <dfn>FALSE</dfn>.
				Returning a string will be used in place of the language-based error message.
				It will still be passed into <var><b>sprintf</b></var> with the <var><i>label</i></var> and rule <var><i>params</i></var> as arguments, so you will need to escape <dfn>%</dfn> characters.</li>
		</ul>
	</li>
</ul>


</div>
<!-- END CONTENT -->


<div id="footer">
<p>
<span id="footer_previous">Previous Topic:&nbsp;&nbsp;<a href=""></a>
&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;</span>
<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
<a href="../../index.html">User Guide Home</a>
<span id="footer_next">&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
Next Topic:&nbsp;&nbsp;<a href=""></a></span>
</p>
<div id="copyrights">
<p><a href="/">Datamapper ORM</a> &nbsp;&middot;&nbsp; Copyright &copy; 2010-2011 &nbsp;&middot;&nbsp; Harro "WanWizard" Verton</p>
<p><a href="../license.html">Other License Information</a></p>
</div>
</div>

<script type="text/javascript" src="../../js/mootools.js"></script>
<script type="text/javascript" src="../../js/menu.js"></script>
<script type="text/javascript">
<!--
	window.addEvent('domready', function() {

		// Create Menu
		var menu = new Menu({
			basepath: '../../',
			pagespath: '../',
			last: 'changelog'
		});

	});
//-->
</script>
</body>
</html>
